<template>
  <el-table
    ref="multipleTable" :data="tabData"
    tooltip-effect="dark" style="width: 100%" height="100%"
    @current-change="handleSelectionChange"
    highlight-current-row :class="tabStyle">
    <el-table-column v-for="item in tabDeploy" :key="item.porp" :prop="item.prop"
      :label="item.label" :width="item.width" :align="item.align" :header-align="item.headerAlign">
    </el-table-column>
  </el-table>
</template>

<script>
  export default {
    name: 'Tab',
    props: {
      tabData: {
        type: Array,
        default: [],
        //required: true
      },
      tabDeploy: {
        //type: Array,
        //required: true
      },
      tabStyle: {
        //type: String,
        //required: true
      }
    },

    methods: {
      handleSelectionChange (val) {
        this.$emit('selected', val.id);
      }
    }
  }
</script>

<style>

</style>
